//
//  InfinityScrollView.h
//  ScrollView无限轮播
//
//  Created by LeungChaos on 16/4/6.
//  Copyright © 2016年 liang. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol InfinityScrollViewDelegate <NSObject>

- (void)currentImageIndex:(NSUInteger)currentIndex;

@end

typedef void(^IndexDidChangeBlock)(NSUInteger currentIndex);

@interface InfinityScrollView : UIScrollView


@property (nonatomic, weak) id<InfinityScrollViewDelegate>infDelegate;

//@property (nonatomic, copy) IndexDidChangeBlock indexDidChangeBlock;

/**
 *  通过装着图片名称的数组创建一个无限滑动的scrollView
 *
 *  @param imageNames 装着图片名称的数组
 */
+ (instancetype)infinityScrollViewWithImageNames:(NSArray <NSString *>*)imageNames isNetwork:(BOOL ) isNetwork;
/**
 *  通过装着图片名称的数组一个的初始化方法 当显示图片改变时回调block
 *
 *  @param imageNames 装着图片名称的数组
 */
- (instancetype)initWithImageNames:(NSArray <NSString *>*)imageNames isNetwork:(BOOL ) isNetwork indexDidChangeBlock:(IndexDidChangeBlock)indexDidChangeBlock;

/**
 *  通过装着图片名称的数组创建一个无限滑动的scrollView 当显示图片改变时回调block
 */
+ (instancetype)infinityScrollViewWithImageNames:(NSArray <NSString *>*)imageNames isNetwork:(BOOL ) isNetwork indexDidChangeBlock:(IndexDidChangeBlock)indexDidChangeBlock;
/**
 *  装着图片名称的数组
 */
@property (nonatomic, strong) NSArray <NSString *> *imageNamesArray;



@end
